package ch09;

class _06_CardToString2 {
	public static void main(String[] args) {
		Card6 c = new Card6("HEART", 10);
		System.out.println(c.toString()); // kind : HEART, number : 10
	}
}

class Card6 {
	String kind;
	int number;

	Card6() {
		this("SPADE", 1);
	}

	Card6(String kind, int number) {
		this.kind = kind;
		this.number = number;
	}

	public String toString() {
		return "kind : " + kind + ", number : " + number;
	}
}